<template>
  <pageHeader :title="title" :breadCrumb="breadCrumb" :show-back="true">
  </pageHeader>
  <div>
    <a-tabs @change="changeTabs" v-model="changeTabs" type="line">
      <a-tab-pane :key="0" title="待确认入库单"
        ><ConfirmReceipt v-if="changeTabsMsg === 0"></ConfirmReceipt>
      </a-tab-pane>
      <a-tab-pane :key="1" title="物料上架"
        ><Materiallisting v-if="changeTabsMsg === 1" />
      </a-tab-pane>
      <!-- <a-tab-pane :key="2" title="已归档"> </a-tab-pane> -->
    </a-tabs>
  </div>
  <!-- <qrcode-vue :value="value" :size="size" level="H" /> -->
  <!-- <Barcode :value="value"></Barcode> -->
</template>

<script lang="ts" setup>
  import {
    reactive,
    ref,
    computed,
    onMounted,
    defineAsyncComponent,
  } from 'vue';
  import { useRouter } from 'vue-router';
  import dayjs from 'dayjs';
  // import {
  //   getPurchaseHeader,
  //   PUTPurchaseHeader,
  //   getPurchaseApplyList,
  //   delPurchaseApplyList,
  //   PutPurchaseApplyList,
  // } from '@/api/buy-management/buy-apply/index';
  import {
    GetWarehouseEntryAll,
    GetHeaderAll,
    putHeader,
    delWarehouseEntry,
    putWarehouseEntryState,
  } from '@/api/inventory-management/warehousing-management/receiving-management/index';

  let ConfirmReceipt = defineAsyncComponent(
    () => import('./confirm/index.vue')
  );
  let Materiallisting = defineAsyncComponent(
    () => import('./material-listing/index.vue')
  );

  const changeTabsMsg = ref(0);

  const changeTabs = (e: any) => {
    changeTabsMsg.value = e;
  };

  const router = useRouter();
  const title: string = '采购入库';
  const breadCrumb: string[] = ['库存管理', '入库管理', '采购入库'];
</script>

<style scoped lang="less">
  :deep(.arco-tabs-content) {
    padding-top: 10px;
  }
</style>
